(function () {
    'use strict';

    // Usage:
    //
    // Creates:
    //

    angular
        .module('yky.components')
        .component('exams', {
            templateUrl: './exams.html',
            controller: ExamController,
            controllerAs: 'vm',
            bindings: {
                Binding: '='
            }
        });

    /* @ngInject */
    function ExamController($http,$uibModal) {
        var vm = this;
        vm.exams = [
            {
                name: '考试说明',
                date: '2017-3',
                questions: [
                    {
                        subject: '色彩',
                        content: '色彩的考题内容,上的风湿膏圣诞狗狗感到翻跟斗感到反感的是胜多负少低分是'
                    }, {
                        subject: '素描',
                        content: '素描的考题内容'
                    }, {
                        subject: '速写',
                        content: '速写的考题内容'
                    }
                ]
            },
            {
                name: '考试说明',
                date: '2017-2',
                questions: [
                    {
                        subject: '色彩',
                        content: '色彩的考题内容,上的风湿膏圣诞狗狗感到翻跟斗感到反感的是胜多负少低分是'
                    }, {
                        subject: '素描',
                        content: '素描的考题内容'
                    }, {
                        subject: '速写',
                        content: '速写的考题内容'
                    }
                ]
            },
            {
                name: '考试说明',
                date: '2017-1',
                questions: [
                    {
                        subject: '色彩',
                        content: '色彩的考题内容,上的风湿膏圣诞狗狗感到翻跟斗感到反感的是胜多负少低分是'
                    }, {
                        subject: '素描',
                        content: '素描的考题内容'
                    }, {
                        subject: '速写',
                        content: '速写的考题内容'
                    }
                ]
            },
            {
                name: '考试说明',
                date: '2017-1',
                questions: [
                    {
                        subject: '色彩',
                        content: '色彩的考题内容,上的风湿膏圣诞狗狗感到翻跟斗感到反感的是胜多负少低分是'
                    }, {
                        subject: '素描',
                        content: '素描的考题内容'
                    }, {
                        subject: '速写',
                        content: '速写的考题内容'
                    }
                ]
            },
            {
                name: '考试说明',
                date: '2017-1',
                questions: [
                    {
                        subject: '色彩',
                        content: '色彩的考题内容,上的风湿膏圣诞狗狗感到翻跟斗感到反感的是胜多负少低分是'
                    }, {
                        subject: '素描',
                        content: '素描的考题内容'
                    }, {
                        subject: '速写',
                        content: '速写的考题内容'
                    }
                ]
            }
        ]


        vm.openForm = function (user) {
        var modalInstance = $uibModal.open({
            animation: true,
            component: 'examForm',
            resolve: {
                user: user
            }
        });
        modalInstance.result.then(function (value) {
            
        });
    }
        ////////////////

        vm.onInit = function () {};
        vm.onChanges = function (changesObj) {};
        vm.onDestory = function () {};
    }
})();